#include<stdio.h>
#include<errno.h>
#include<string.h>

/*
 *
	若当前路径下无 1.txt文件
	fopen: No such file or directory
	fopen: No such file or directory

	若当前路径下有1.txt文件
	Open file Success
	Close file Success

 */

int main(){
	FILE *fp;
	int fpret;
	fp = fopen("1.txt", "r");
	if(fp == NULL){
		perror("fopen");
		printf("fopen: %s\n", strerror(errno));
	}else {
		printf("Open file Success\n");
		fpret = fclose(fp);
		if(fpret == 0){
			printf("Close file Success\n");
		}else {
			perror("fclose");
		}
	}
}
